package com.zwj.sharding.mysql.mapper;

import com.zwj.sharding.mysql.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ProductMapper {

    /**
     * 新增
     * @param product
     */
    void insert(Product product);

    /**
     * 根据id查找
     * @param productId
     * @return
     */
    Product selectById(@Param("productId") long productId);

    List<Product> selectAll();
}

